extends MoveElement


class_name KeyboardElement
"""
键盘控制方向移动
"""


## 方向键 左
@export var move_left: String = "ui_left"
## 方向键 右
@export var move_right: String = "ui_right"
## 方向键 上
@export var move_up: String = "ui_up"
## 方向键 下
@export var move_down: String = "ui_down"


func yield_move(delta: float) -> Vector2:
    move_component.direction = Input.get_vector(move_left, move_right, move_up, move_down)
    return Vector2.ZERO
